<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="static/js/jquery/jquery-2.2.4.min.js"></script>

<script type="text/javascript">
	//第一种写法
	/*$(document).ready(
		function(){
			//$("#test").css("background-color","red");
			//$("#test").css("width",150);
			//$("#test").css("height",150);
			$("#test").css({"background-color": "red","width":"150px","height":"150px"});
			//$("#test").attr("style","background-color: red;width:150px;height:150px;");
			alert($("#test").attr("style"));
			$("#test").html("<span style='background-color:blue'>dfdfdf</span>");
			$("#test").text($("#test").html()+"9999");
		}
	);*/

	//第二种写法
	$(function(){
		//$("#test").css("background-color","red");
		//$("#test").css("width",150);
		//$("#test").css("height",150);
		$("#test").css({"background-color": "red","width":"150px","height":"150px"});
		//$("#test").attr("style","background-color: red;width:150px;height:150px;");
		alert($("#test").attr("style"));
		$("#test").html("<span style='background-color:blue'>dfdfdf</span>");
		$("#test").text($("#test").html()+"9999");
	});
</script>
</head>
<body>
	<div id="test" style="background-color: blue;border:1px solid green;"></div>
</body>
</html>